package org.taobao.ibatiside.core.filemodel;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;

public class IbatisMapperFile extends IbatisElement {
	private final IFile sqlmapFile;
	private String resourceName;
	
	public int getVersion() {
		return ((IbatisConfigFile)getParent()).getVersion();
	}
	
	public IbatisMapperFile(IFile sqlmapFile, IbatisConfigFile configFile) {
		super();
		this.sqlmapFile = sqlmapFile;
		setParent(configFile);
	}

	public IFile getSqlmapFile() {
		return sqlmapFile;
	}
	public String getResourceName() {
		return resourceName;
	}
	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}
	@Override
	public IResource getResource() {
		return sqlmapFile;
	}
}
